-- Copyright 2012 Nicolas BARBOTIN
-- This file is part of PlayeRanks.
-- 
-- PlayeRanks is free software: you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation, either version 3 of the License, or
-- (at your option) any later version.
-- 
-- PlayeRanks is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-- GNU General Public License for more details.
-- 
-- You should have received a copy of the GNU General Public License
-- along with PlayeRanks.  If not, see <http://www.gnu.org/licenses/>.

if CLIENT then
	pranks = {}

	-- Receive ranks table and save it
	net.Receive("PlayeRanks", function(len)
		local count = net.ReadUInt(5)
		MsgN("[INFO] PlayeRanks: Received " .. tostring(count) .. " ranks !")

		for i = 1, count do
			pranks[i] = {}

			pranks[i].name = net.ReadString()
			pranks[i].colorRed = net.ReadUInt(8)
			pranks[i].colorGreen = net.ReadUInt(8)
			pranks[i].colorBlue = net.ReadUInt(8)
		end
	end)

	MsgN("[INFO] PlayeRanks: Initialization ended client-side.")
end
